<script >
import {ref} from 'vue'
export default{
  setup(){
  let index =ref(6)
  const increment=()=>{
    index.value-=1
  }
  const incre=()=>{
    index.value+=1
  }
  return{index,increment,incre}
  }
}
</script>
<template>
 <p> {{index}}</p>
 <button @click="increment">-</button>
 <button @click="incre">+</button>
</template>
<style>
</style>